<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<style type="text/css">
		#box1{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
			float: left;
			color: #fff;
			font-size: 30px;
			line-height: 200px;
			text-align: center;

		}
		#box2{
			width: 200px;
			height: 200px;
			background: blue url() 0 0 no-repeat;
			float: left;
			color: #fff;
			font-size: 30px;
			line-height: 200px;
			text-align: center;
		}
	</style>
	<script type="text/javascript">
		window.onload=function () {
			box1 = document.getElementById('box1');

			box2 = document.getElementById('box2');

			box1.onclick= function () {
				if(!box1.innerHTML){
					box1.innerHTML=box2.innerHTML;
					box2.innerHTML = '';
				}
			}
			box2.onclick= function () {
				if(!box2.innerHTML){
					box2.innerHTML=box1.innerHTML;
					box1.innerHTML = '';
				}
			}


		}
	</script>
</head>
<body>
	<div id="box1">学并思</div>
	<div id="box2"></div>
</body>
</html>